import forum.command.console.Console;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) {
        Console console = new Console();
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        while(true) {
            String s;
            System.out.print(">");
            try {
                s = reader.readLine();
                console.run(s);
            } catch (IOException e) {
                e.printStackTrace();
            } catch (NullPointerException e) {
                //System.out.println(e.toString());
                e.printStackTrace();
            } catch (IndexOutOfBoundsException e) {
                //System.out.println("incorrect parameters for command");
                e.printStackTrace();
            } catch (IllegalArgumentException e) {
                //System.out.println(e.toString());
                e.printStackTrace();
            }
        }
    }

}
